<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddColumnsTableAdminUsers extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('admin_users', function (Blueprint $table) {
            $table->string('avatar',255)->nullable()->change();
            $table->string('remember_token',255)->nullable()->change();
            $table->string('last_login_ip',255)->nullable()->change();
            $table->string('last_login_time',255)->nullable()->change();
            $table->string('mobile',11)->comment('电话号码')->nullable();
            $table->string('sex',20)->comment('性别')->default('male');
            $table->string('description',255)->comment('描述')->nullable();
            $table->string('role',50)->comment('角色')->nullable();
            $table->string('email',50)->comment('邮箱')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('admin_users', function (Blueprint $table) {
            //
        });
    }
}

